﻿
'reference to http://msdn.microsoft.com/en-sg/magazine/cc188929(en-us).aspx#S1

'#################################################
'
'   clsboxOverride
'       This is the class that we use to pass 
'       information to the sites listbox on the 
'       main page.  It allows us to use an
'       itemdata-like function - which no longer
'       exists in VB.NET, but add additional
'       elements that we can store alongside the 
'       entries in a listbox.  We used to have 
'       to use a collection or an array to maintain
'       these.
'
'   Entry Point:  New
'
'#################################################

Option Explicit On

Public Class clsboxOverride
    'This class was constructed to override the fact that there no longer
    'exists an itemdata property for the list boxes in my project
    Private m_sSiteName As String
    Private m_sSiteURL As String
    Private m_iSiteID As Long

    Public Sub New(ByVal sSiteName As String, ByVal sSiteURL As String, ByVal iSiteID As Long)
        m_sSiteName = sSiteName
        m_sSiteURL = sSiteURL
        m_iSiteID = iSiteID
    End Sub

    Public Property SiteName() As String
        Set(ByVal Value As String)
            m_sSiteName = Value
        End Set

        Get
            Return m_sSiteName
        End Get
    End Property

    Public Property SiteURL() As String
        Set(ByVal Value As String)
            m_sSiteURL = Value
        End Set

        Get
            Return m_sSiteURL
        End Get
    End Property

    Public Property SiteID() As Long
        Set(ByVal Value As Long)
            m_iSiteID = Value
        End Set

        Get
            Return m_iSiteID
        End Get
    End Property

    Public Overrides Function ToString() As String
        Return m_sSiteName
    End Function

End Class
